package com.uduew.sjd.api;

import static com.uduew.sjd.config.Const.ORDER_LIST;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import com.uduew.sjd.bean.HttpBean;
import com.hjq.http.config.IRequestApi;
import com.hjq.http.config.IRequestBodyStrategy;
import com.hjq.http.config.IRequestType;
import com.hjq.http.model.RequestBodyType;

import java.util.ArrayList;


public class AllLoanOrdersApi implements IRequestApi, IRequestType {

    private ReqAllLoanOrdersBean euhedral;

    public AllLoanOrdersApi(String phylogenic, ArrayList<String> debrief, int coimbatore, int piat) {
        euhedral = new ReqAllLoanOrdersBean(phylogenic, debrief, coimbatore, piat);
    }

    @NonNull
    @Override
    public String getApi() {
        return ORDER_LIST;
    }

    /**
     * 获取参数的提交类型
     */
    @NonNull
    @Override
    public IRequestBodyStrategy getBodyType() {
        return RequestBodyType.JSON;
    }

    public static class ReqAllLoanOrdersBean {
        private String phylogenic;
        private ArrayList<String> debrief;
        private int coimbatore;
        private int piat;
//        private ActaBean acta;

        public ReqAllLoanOrdersBean(String phylogenic, ArrayList<String> debrief, int coimbatore, int piat) {
            this.phylogenic = phylogenic;
            this.debrief = debrief;
            this.coimbatore = coimbatore;
            this.piat = piat;
        }

        public static class ActaBean {
            private String polyphyleticism;
            private String nepotistical;

            public ActaBean(String polyphyleticism, String nepotistical) {
                this.polyphyleticism = polyphyleticism;
                this.nepotistical = nepotistical;
            }
        }
    }

    public static class ResAllLoanOrdersBean extends HttpBean {
        private MamaguyBean mamaguy;

        public MamaguyBean getMamaguy() {
            return mamaguy;
        }

        public static class MamaguyBean {

            public int getFaucial() {
                return faucial;
            }

            public int getCurmudgeonly() {
                return curmudgeonly;
            }

            public int getMoonstone() {
                return moonstone;
            }

            public int getPrurience() {
                return prurience;
            }

            public ArrayList<ThoroughBean> getThorough() {
                return thorough;
            }

            private int faucial;
            private int curmudgeonly;
            private int moonstone;
            private int prurience;

            private ArrayList<ThoroughBean> thorough;

            public static class ThoroughBean implements Parcelable {

                protected ThoroughBean() {
                }

                protected ThoroughBean(Parcel in) {
                    beastly = in.readString();
                    nuciform = in.readDouble();
                    phylogenic = in.readString();
                    moldiness = in.readString();
                    irrelevant = in.readString();
                    ichneumon = in.readInt();
                    stp = in.readByte() != 0;
                    scooterist = in.readString();
                    calculator = in.readDouble();
                    uniformitarian = in.readString();
                    thalassochemical = in.readString();
                    ultimatism = in.readLong();
                    tubulure = in.readDouble();
                    coleopteran = in.readString();
                    yod = in.readString();
                    metatarsal = in.readString();
                }

                public static final Creator<ThoroughBean> CREATOR = new Creator<ThoroughBean>() {
                    @Override
                    public ThoroughBean createFromParcel(Parcel in) {
                        return new ThoroughBean(in);
                    }

                    @Override
                    public ThoroughBean[] newArray(int size) {
                        return new ThoroughBean[size];
                    }
                };

                @Override
                public String toString() {
                    return "ThoroughBean{" +
                            "beastly='" + beastly + '\'' +
                            ", nuciform=" + nuciform +
                            ", phylogenic='" + phylogenic + '\'' +
                            ", moldiness='" + moldiness + '\'' +
                            ", irrelevant='" + irrelevant + '\'' +
                            ", ichneumon=" + ichneumon +
                            ", stp=" + stp +
                            ", scooterist='" + scooterist + '\'' +
                            ", calculator=" + calculator +
                            ", uniformitarian='" + uniformitarian + '\'' +
                            ", thalassochemical='" + thalassochemical + '\'' +
                            ", ultimatism=" + ultimatism +
                            ", tubulure=" + tubulure +
                            ", coleopteran='" + coleopteran + '\'' +
                            ", yod='" + yod + '\'' +
                            ", metatarsal='" + metatarsal + '\'' +
                            ", nursing=" + nursing +
                            '}';
                }

                private String beastly;
                private double nuciform;
                private String phylogenic;
                private Boolean shamos;
                private String moldiness;
                private String irrelevant;
                private int ichneumon;
                private boolean stp;
                private String scooterist;
                private double calculator;
                private String uniformitarian;
                private String thalassochemical;
                private long ultimatism;
                private double tubulure;
                private String coleopteran;
                private String yod;
                private String metatarsal;
                private NursingBean nursing;

                public Boolean getShamos() {
                    return shamos;
                }

                public String getBeastly() {
                    return beastly;
                }

                public double getNuciform() {
                    return nuciform;
                }

                public String getNuciformStr() {
                    return nuciform + "";
                }


                public String getPhylogenic() {
                    return phylogenic;
                }

                public String getMoldiness() {
                    return moldiness;
                }

                public String getIrrelevant() {
                    return irrelevant;
                }

                public int getIchneumon() {
                    return ichneumon;
                }

                public boolean isStp() {
                    return stp;
                }

                public String getScooterist() {
                    return scooterist;
                }

                public double getCalculator() {
                    return calculator;
                }

                public String getUniformitarian() {
                    return uniformitarian;
                }

                public String getThalassochemical() {
                    return thalassochemical;
                }

                public long getUltimatism() {
                    return ultimatism;
                }

                public double getTubulure() {
                    return tubulure;
                }

                public String getColeopteran() {
                    return coleopteran;
                }

                public String getYod() {
                    return yod;
                }

                public String getMetatarsal() {
                    return metatarsal;
                }

                public NursingBean getNursing() {
                    return nursing;
                }

                @Override
                public int describeContents() {
                    return 0;
                }

                @Override
                public void writeToParcel(@NonNull Parcel parcel, int i) {
                    parcel.writeString(beastly);
                    parcel.writeDouble(nuciform);
                    parcel.writeString(phylogenic);
                    parcel.writeString(moldiness);
                    parcel.writeString(irrelevant);
                    parcel.writeInt(ichneumon);
                    parcel.writeByte((byte) (stp ? 1 : 0));
                    parcel.writeString(scooterist);
                    parcel.writeDouble(calculator);
                    parcel.writeString(uniformitarian);
                    parcel.writeString(thalassochemical);
                    parcel.writeLong(ultimatism);
                    parcel.writeDouble(tubulure);
                    parcel.writeString(coleopteran);
                    parcel.writeString(yod);
                    parcel.writeString(metatarsal);
                }

                public static class NursingBean {

                    private String giglot;
                    private String negligence;
                    private String ichneumon;
                    private String nuciform;

                    public String getGiglot() {
                        return giglot;
                    }

                    public String getNegligence() {
                        return negligence;
                    }

                    public String getIchneumon() {
                        return ichneumon;
                    }

                    public String getNuciform() {
                        return nuciform;
                    }
                }
            }

        }
    }
}
